#include "Guest.h"

Network::Guest::Guest()
{
}

Network::Guest::~Guest()
{
}

unsigned int	Network::Guest::Init()
{
	return (this->CreateSocket());
}

unsigned int	Network::Guest::Connect(const std::string& address, unsigned short port)
{
	this->_socketInfos.sin_addr.S_un.S_addr = inet_addr(address.c_str());
	this->_socketInfos.sin_port = htons(port);
	if (connect(this->_socket, (sockaddr*)&(this->_socketInfos), this->_socketInfosLenght) != 0)
		return (1);
	this->_address = address;
	this->_port = port;
	return (0);
}
